package com.material.pound.service.impl;

import java.util.List;
import com.material.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.material.pound.mapper.FuelPoundAssayMapper;
import com.material.pound.domain.FuelPoundAssay;
import com.material.pound.service.IFuelPoundAssayService;

/**
 * 磅单化验明细Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-06-20
 */
@Service
public class FuelPoundAssayServiceImpl implements IFuelPoundAssayService 
{
    @Autowired
    private FuelPoundAssayMapper fuelPoundAssayMapper;

    /**
     * 查询磅单化验明细
     * 
     * @param id 磅单化验明细主键
     * @return 磅单化验明细
     */
    @Override
    public FuelPoundAssay selectFuelPoundAssayById(Long id)
    {
        return fuelPoundAssayMapper.selectFuelPoundAssayById(id);
    }

    /**
     * 查询磅单化验明细列表
     * 
     * @param fuelPoundAssay 磅单化验明细
     * @return 磅单化验明细
     */
    @Override
    public List<FuelPoundAssay> selectFuelPoundAssayList(FuelPoundAssay fuelPoundAssay)
    {
        return fuelPoundAssayMapper.selectFuelPoundAssayList(fuelPoundAssay);
    }

    /**
     * 新增磅单化验明细
     * 
     * @param fuelPoundAssay 磅单化验明细
     * @return 结果
     */
    @Override
    public int insertFuelPoundAssay(FuelPoundAssay fuelPoundAssay)
    {
        fuelPoundAssay.setCreateTime(DateUtils.getNowDate());
        return fuelPoundAssayMapper.insertFuelPoundAssay(fuelPoundAssay);
    }

    /**
     * 修改磅单化验明细
     * 
     * @param fuelPoundAssay 磅单化验明细
     * @return 结果
     */
    @Override
    public int updateFuelPoundAssay(FuelPoundAssay fuelPoundAssay)
    {
        return fuelPoundAssayMapper.updateFuelPoundAssay(fuelPoundAssay);
    }

    /**
     * 批量删除磅单化验明细
     * 
     * @param ids 需要删除的磅单化验明细主键
     * @return 结果
     */
    @Override
    public int deleteFuelPoundAssayByIds(Long[] ids)
    {
        return fuelPoundAssayMapper.deleteFuelPoundAssayByIds(ids);
    }

    /**
     * 删除磅单化验明细信息
     * 
     * @param id 磅单化验明细主键
     * @return 结果
     */
    @Override
    public int deleteFuelPoundAssayById(Long id)
    {
        return fuelPoundAssayMapper.deleteFuelPoundAssayById(id);
    }
}
